import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'

Vue.config.productionTip = false
// 导入axios
import Axios from "../src/api/http"
// 将axios放到vue原型上，属性$http
Vue.prototype.$http=Axios;
// this.$http.get   等价于  axios.get
Vue.prototype.$eventBus=new Vue();

let _token = localStorage.getItem("_token");
if (_token) {
    store.commit("my/setToken", _token);
}
new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
